package com.drm.netschool.mapper;

import com.drm.netschool.entity.DrmCourseType;
import com.drm.netschool.entity.DrmCourseTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DrmCourseTypeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int countByExample(DrmCourseTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int deleteByExample(DrmCourseTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Delete({
        "delete from drm_course_type",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Insert({
        "insert into drm_course_type (id, course_class, ",
        "course_tp, seq, course_cnt, ",
        "use_yn, offcourse_cnt, ",
        "create_uid, update_uid)",
        "values (#{id,jdbcType=BIGINT}, #{courseClass,jdbcType=INTEGER}, ",
        "#{courseTp,jdbcType=VARCHAR}, #{seq,jdbcType=INTEGER}, #{courseCnt,jdbcType=INTEGER}, ",
        "#{useYn,jdbcType=INTEGER}, #{offcourseCnt,jdbcType=INTEGER}, ",
        "#{createUid,jdbcType=BIGINT}, #{updateUid,jdbcType=BIGINT})"
    })
    int insert(DrmCourseType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int insertSelective(DrmCourseType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    List<DrmCourseType> selectByExample(DrmCourseTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Select({
        "select",
        "id, course_class, course_tp, seq, course_cnt, use_yn, offcourse_cnt, create_uid, ",
        "update_uid",
        "from drm_course_type",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @ResultMap("BaseResultMap")
    DrmCourseType selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByExampleSelective(@Param("record") DrmCourseType record, @Param("example") DrmCourseTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByExample(@Param("record") DrmCourseType record, @Param("example") DrmCourseTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByPrimaryKeySelective(DrmCourseType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_type
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Update({
        "update drm_course_type",
        "set course_class = #{courseClass,jdbcType=INTEGER},",
          "course_tp = #{courseTp,jdbcType=VARCHAR},",
          "seq = #{seq,jdbcType=INTEGER},",
          "course_cnt = #{courseCnt,jdbcType=INTEGER},",
          "use_yn = #{useYn,jdbcType=INTEGER},",
          "offcourse_cnt = #{offcourseCnt,jdbcType=INTEGER},",
          "create_uid = #{createUid,jdbcType=BIGINT},",
          "update_uid = #{updateUid,jdbcType=BIGINT}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(DrmCourseType record);
}